<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js"></script>
</head>

<body>
    <style>
        div {
            border-bottom: red 3px solid;
            margin-bottom: 50px;
        }

        th {
            width: 140px;
            ;
        }
    </style>

    <div>
        姓名:<input type="text" id="int1"></br></br>
        年龄:<input type="text" id="int2"></br></br>
        电话:<input type="text" id="int3"></br></br>
        邮箱:<input type="text" id="int4"></br></br>
        性别:<input type="text" id="int5"></br></br>
        民族:<input type="text" id="int6"></br></br>
        <button id="btn1">提交</button></br></br>
    </div>
    姓名:<input type="text"><button>搜索</button>
    </br></br>
    <table border="1">
        <thead>
            <tr>
                <th>姓名</th>
                <th>年龄</th>
                <th>电话</th>
                <th>邮箱</th>
                <th>性别</th>
                <th>民族</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody></tbody>
    </table>
</body>
<script>
    $(function () {
        var kong = ""
        $('#btn1').click(function () {
            var int1 = $('#int1').val()
            var int2 = $('#int2').val()
            var int3 = $('#int3').val()
            var int4 = $('#int4').val()
            var int5 = $('#int5').val()
            var int6 = $('#int6').val()
            kong += `<tr>
         <td>${int1}</td>
         <td>${int2}</td>
         <td>${int3}</td>
         <td>${int4}</td>
         <td>${int5}</td>
         <td>${int6}</td>
         <td><button>编辑</button> | <button id="two">删除</button></td>
         </tr>`
            $('tbody').html(kong)
            $("#two").click(function () {
            $("table tr:not(:first):last").remove();
            });
        });
    })
</script>

</html>